import service from "./request.js";

export default {
  // 修改菜单
  update(query) {
    return service({
      method: "PUT",
      url: "/admin-api/system/menu/update",
      data: query,
    });
  },
  // 创建菜单
  create(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/menu/create",
      data: query,
    });
  },
  // 获取菜单列表
  list(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/menu/list",
      params: query,
    });
  },
  // 获取菜单精简信息列表
  listAllSimple(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/menu/list-all-simple",
      params: query,
    });
  },
  // 获取菜单精简信息列表
  listSimple(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/menu/simple-list",
      params: query,
    });
  },
  // 获取菜单信息
  get(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/menu/get",
      params: query,
    });
  },
  // 删除菜单
  delete(query) {
    return service({
      method: "DELETE",
      url: "/admin-api/system/menu/delete",
      params: query,
    });
  },
};
